using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OleDb;
namespace prDe_Tai.TruyXuat
{
    class LayDuLieu
    {
        OleDbConnection con = new OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=QuanLyPhanMem.mdb");
        public DataSet laydulieukhicothamso(OleDbCommand com)
        {
            com.Connection = con;
            DataSet ds = new DataSet();
            OleDbDataAdapter da = new OleDbDataAdapter();
            da.SelectCommand = com;
            da.Fill(ds);
            return ds;
        }
        public DataSet laydulieukhikhongcothamso(string chuoicaulenh)
        {
            OleDbCommand com = new OleDbCommand();
            com.Connection = con;
            com.CommandType = CommandType.Text;
            com.CommandText = chuoicaulenh;
            DataSet ds=laydulieukhicothamso(com);
            return ds;
        }
    }
}
